#include "RenderObject.h"


RenderObject::RenderObject()
{
	m_pSDKMesh = NULL;
	m_pShader = NULL;
}

RenderObject::~RenderObject()
{
	if(m_pSDKMesh)
	{
		delete m_pSDKMesh;
		m_pSDKMesh = NULL;
	}
}

HRESULT RenderObject::Create(WCHAR* szFileName,void* pParameters)
{
	HRESULT hr = 0;
	ID3D11Device* pd3dDevice = DXUTGetD3D11Device();
	m_pSDKMesh = new CDXUTSDKMesh();
	
	if (m_pSDKMesh)
		V_RETURN(m_pSDKMesh->Create(pd3dDevice,szFileName));

	//m_pSDKMesh->
	m_pShader = (Shader*)pParameters;
	return TRUE;
}

HRESULT RenderObject::Release()
{
	m_pSDKMesh->Destroy();
	return TRUE;
}

